package com.party.core.service.system.util;

import com.party.common.utils.SpringContextHolder;
import com.party.core.model.member.MemberGroup;
import com.party.core.service.member.IMemberGroupService;

/**
 * 表单帮助类
 */
public class MemberFormUtil {
    static IMemberGroupService memberGroupService = SpringContextHolder.getBean(IMemberGroupService.class);

    /**
     * 根据id获取用户昵称
     * @param id
     * @return
     */
    public static String getRealNameById(String id) {
        MemberGroup member = memberGroupService.get(id);
        if (member != null) {
            return member.getRealname();
        }
        return "";
    }
}
